package org.ytor.core.querygen;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.ytor.common.model.R;
import org.ytor.core.sqlflow.builder.support.WhereBuilder;

/**
 * created by yangtong on 2025/4/6 下午5:31
 * <p>
 * 查询生成器接口
 */
@RestController
@RequestMapping("/core/querygen")
@AllArgsConstructor
@Tag(name = "查询生成器")
public class QueryGenController {

    @GetMapping("/testQueryGen")
    @Operation(summary = "test", description = "test")
    public R<?> test(HttpServletRequest request, HttpServletResponse response) {
        WhereBuilder where = WhereGenerator.where();
        return R.success(where.toSql());
    }

}
